package models;

import java.util.*;

import javax.persistence.*;

import play.data.validation.Valid;
import play.db.jpa.Model;

@Entity
public class Appointment extends Model {
	public static final String STATE_INCOMPLETE = "INCOMPLETE";
	public static final String STATE_COMPLETE = "COMPELTE";
	public static final String STATE_CONFIRMED = "CONFIRMED";
	public static final String STATE_FROZEN = "FROZEN";
	
	public String date;
	public String time;
	
	@ManyToOne
	public Customer owner;
	
	public String state;
	
	@Lob
	public String comment;
	
	@ManyToOne
	public Restaurant restaurant;
	
	public Appointment(Customer owner, String date, String comment, Restaurant restaurant, String time) {
		super();
		this.owner = owner;
		this.date = date;
		this.comment = comment;
		this.state = Appointment.STATE_INCOMPLETE;
		this.restaurant = restaurant;
		this.time = time;
	}
}
